from win32com.client import constants
from Cell import Cell

class Sheet(object):
    def __init__(self,object,row=0,col=0):
        self.object = object
        self.row = 1
        self.col = 1

    @property
    def name(self):
        return self.object.Name

    def cell(self,row,col):
        return Cell(self.object.Cells(row,col))

    @property
    def nrows(self):
        return self.object.Range("a65535").End(constants.xlUp).Row

    @property
    def ncols(self):
        return self.object.Range("IV1").End(constants.xlToLeft).Column